package cn.itcast.bos.dao.take_delivery;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import cn.itcast.bos.domain.take_delivery.Order;

public interface OrderDao extends JpaRepository<Order,Integer> {

	List<Order> findByCourierIsNull();
	
	@Query(nativeQuery=true ,value="update t_order set c_send_address=?,c_courier_id=? where c_id=? ")
	@Modifying
	void updateOrderById(String sendAddress, Integer courierid, Integer oid);
	
}
